package com.bsoft.gol.editor.fileUpload;


/**
 * DB数据model包含对象基础类，定义了操作类型（添加、修改、删除）、是否通过验证、是否操作成功和操作失败的描述
 * @author 王智伟
 *
 */
public abstract class AbstractHolder {
	
	private OperationType operationType = OperationType.INSERT;//默认添加
	private int rowIndex;
	private boolean valid = true;//通过验证与否，true-通过验证
	private boolean operationResult = false;//执行结果，true-操作成功
	private StringBuffer errorMsg = new StringBuffer();//错误描述信息
	
	public OperationType getOperationType() {
		return operationType;
	}
	public void setOperationType(OperationType operationType) {
		this.operationType = operationType;
	}
	public boolean isValid() {
		return valid;
	}
	public void setValid(boolean valid) {
		if(this.valid){
			this.valid = valid;
		}
	}
	public boolean isOperationResult() {
		return operationResult;
	}
	public void setOperationResult(boolean operationResult) {
		this.operationResult = operationResult;
	}
	public StringBuffer getErrorMsg() {
		return errorMsg;
	}
	public void append(String msg) {
		this.errorMsg.append(msg);
	}
	public int getRowIndex() {
		return rowIndex;
	}
	public void setRowIndex(int rowIndex) {
		this.rowIndex = rowIndex;
	}
}
